<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;

class BannersThumbs extends Model
{
    protected function setThumbsAttribute($value){
        if (strpos($value,'http')) {
            $this->attributes['thumbs'] = $value;
        }else{
            $this->attributes['thumbs'] = Storage::disk()->url($value);
        }
    }
}
